import VueRouter from 'vue-router'

import HomeContainer from './components/tabbars/HomeContainer.vue'
import ShopcarContainer from './components/tabbars/ShopcarContainer.vue'
import MenberContainer from './components/tabbars/MenberContainer.vue'
import SearchContainer from './components/tabbars/SearchContainer.vue'
import NewList from './components/news/NewList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from './components/photos/PhotoList.vue'
import Photoinfo from './components/photos/photoinfo.vue'
import Goodslist from './components/goods/Goodslist.vue'
import Goodsinfo from './components/goods/Goodsinfo.vue'

const router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/menber',component:MenberContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newslist',component:NewList},
        {path:'/home/newsinfo/:id',component:NewsInfo,props:true},//启用props来接受路由的参数
        {path:'/home/photolist',component:PhotoList},
        {path:'/home/photoinfo/:id',component:Photoinfo,props:true},
        {path:'/home/goodslist',component:Goodslist},
        {path:'/home/goodsinfo/:id',component:Goodsinfo,props:true}
    ],
    linkActiveClass:'mui-active'//手动设置被激活的路由链接的高亮类名
    
})

export default router